package com.cskaoyan.javse.oop3._2inner._5multi;

/**
 * @description: java用内部类实现多继承
 * @author: wuguidong@cskaoyan.onaliyun.com
 **/

public class Demo {
    public static void main(String[] args) {
        A a = new A();
        a.invoke();
    }
}

class A {
    public void invoke(){
        Inner1 inner1 = new Inner1();
        Inner2 inner2 = new Inner2();
        Inner3 inner3 = new Inner3();
        //inner1.test1();
        //inner2.test2();
        inner1.test();
        inner2.test();
        inner3.test3();
    }

    //定义成员内部类
    class Inner1 extends B {
    }

    class Inner2 extends C {
    }

    class Inner3 extends D {
    }

}

class B {
    void test() {
        System.out.println("B");
    }
}

class C {
    void test() {
        System.out.println("C");
    }

}

class D {
    void test3() {
        System.out.println("D");
    }

}
